function init_tcs
% init_tcs  




%% Check If TCS2 Is Responding
pause(0.100)
ok = tcs2.check_serial;

%% Disable TCS2 Temperature Feedback
tcs2.disable_temperature_feedback;
pause(.100)
tcs2.clear_serial;

%% Set Defaults
% We'll use Arthur's defaults:

% Duration of temperature display
tcs2.write_serial('Y0000'); %(default)
%  Set the duration of temperature display during stimulation in ten ms ('xxxx'='0000' to '9999')
% if set to '0000' (default state) displays temperatures during the entire stimulation
%  Dur�e d�affichage (ms) des temp�ratures des 5 zones � pa
% d�but de la stimulation (affichage � 200Hz). Cela permet de 
% v�rifier les temp�ratures pendant la stimulation.

% Trigger In:
% tcs2.write_serial('Os');     % allows a stimulation to be triggered via the trigger in (stim input)

% Neutral temperature:
tcs2.write_serial('N320');   % set neutral temperature in 1/10 degrees ('xxx'='200' to '400')

% Areas:
% - Disable per-area stuffs:
tcs2.write_serial('Ue00000');% enable/disable temperature profile for each area (x='1'=enable or '0'=disable=default)
% - Enable all area (they are all disabled by default!):
tcs2.write_serial('S11111'); % enable/disable area 1 to 5 (x='1'=enable or '0'=disable)
% Les valeurs par d�faut de la commande S sont '00000'. Par cons�quent, toutes les zones sont d�sactiv�es � l�allumage du TCS II. 
% Pour faire des essais de stimulation par le Com S�rie, il faut activer au moins une zone (!!!)

% Stim Duration: 
tcs2.set_stim_duration(200,300,300); % 200ms, 300�/s, 300�/s
% (NB use "tcs2.set_stim_duration" for later work)

%% Say Hi
fprintf('%d pc battery charge left.\n', tcs2.get_battery)
disp('TCS2 initialized :-)')
disp(' ')
